package com.wgz.mcp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wgz.mcp.entry.DepotHead;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface DepotHeadMapper{

    @Select("SELECT vector_id FROM jsh_depot_head WHERE number = #{orderId}")
    String selectVectorIdByOrderId(@Param("orderId") String orderId);

    @Update("update jsh_depot_head set status = #{status} where number = #{orderId}")
    void updateOrderStatus(@Param("orderId") String orderId,@Param("status") String status);

    @Select("select status from jsh_depot_head where number = #{orderId} and tenant_id = #{tenantId}")
    String selectStatusByOrderId(@Param("orderId") String orderId, @Param("tenantId") long tenantId);
}